import request from '@/utils/request'

export default {
  getDictList (data) {
    const url = 'system/dict/list'
    return request.get(url, data)
  },
  addDict (data) {
    const url = 'system/dict'
    return request.post(url, data)
  },
  updateDict (data) {
    const url = 'system/dict'
    return request.put(url, data)
  },
  deleteDict (data) {
    const url = 'system/dict/batchDeleteByIds' + '/' + data
    return request.delete(url)
  },
  getDictValueList (data) {
    const url = 'system/dictValue/list'
    return request.get(url, data)
  },
  addDictValue (data) {
    const url = 'system/dictValue'
    return request.post(url, data)
  },
  updateDictValue (data) {
    const url = 'system/dictValue'
    return request.put(url, data)
  },
  deleteDictValue (data) {
    const url = 'system/dictValue/batchDeleteByIds' + '/' + data
    return request.delete(url)
  },
  getDept () {
    const url = 'system/dept'
    return request.get(url)
  },
  getUserNormal (data) {
    const url = 'system/user/normal'
    return request.get(url, data)
  },

  // 功能服务
  getDeviceModelTsl (data) {
    const url = 'main/deviceModelTsl/queryPage'
    return request.get(url, data)
  },
  addDeviceModelTsl (data) {
    const url = 'main/deviceModelTsl/dealTsl'
    return request.postJson(url, data)
  },
  deleteDeviceModelTsl (data) {
    const url = 'main/deviceModelTsl/deleteTsl'
    return request.delete(url, data)
  },
  getDeviceModelTslById (data) {
    const url = 'main/deviceModelTsl/getById'
    return request.get(url, data)
  }
}
